set printback=OFF.

TITLE LIS Cross-section Data center in Luxembourg.

TITLE email: usersupport@lisdatacenter.org .

TITLE LIS Self Teaching Package 2022.

TITLE Part I: Inequality, poverty, and social policy.
TITLE SPSS version.

TITLE last change of this version of the syntax: 15-01-2022.

* The exercises in Part I demonstrate the use of household income data along with .
* useful programming techniques for working with the LIS data. With a focus on .
* descriptive statistics, the exercises will lead you through the process of developing .
* a complete program that examines inequality and poverty across countries. 


TITLE Exercise 1: Accessing the LIS databases.

get file = gt06h.
descriptive variables = dhi.


TITLE Exercise 2:	Sample selection and weighting.

get file = gt06h /keep=did dhi hifactor hpub_i hpub_u hpub_a hiprivate hxitsc hpopwgt nhhmem grossnet.
compute miss_comp = 0.
if (missing(dhi) or missing(hifactor) or missing(hpub_i) or missing(hpub_u) or missing(hpub_a) or missing(hiprivate) or missing(hxitsc)) miss_comp = 1.
frequencies variables =  miss_comp.
descriptives variables = dhi hifactor hpub_i hpub_u hpub_a hiprivate hxitsc hpopwgt.
frequencies variables = dhi /statistics=median /format=notable.
frequencies variables = grossnet.
compute populat = hpopwgt * nhhmem.
weight by populat.
descriptives variables = dhi hifactor hpub_i hpub_a hiprivate hxitsc hpopwgt.
frequencies variables = dhi /statistics=median /format=notable.
select if miss_comp eq 0.
descriptives variables = dhi hifactor hpub_i hpub_a hiprivate hxitsc hpopwgt.
frequencies variables = dhi /statistics=median /format=notable.

get file = gt06h. 
frequencies variables = currency.


TITLE Exercise 3: Working with household income variables.
TITLE (top and bottom coding and equivalence scales).

define dataprepare ().  
SET ERRORS OFF. 
compute miss_comp = 0.
if (missing(dhi) or missing(hifactor) or missing(hpub_i) or missing(hpub_u) or missing(hpub_a) or missing(hiprivate) or missing(hxitsc)) miss_comp = 1.
select if miss_comp eq 0.
* select only records if dhi filled. 
select if not missing(dhi) . 
* create top and bottom coded household disposable income.
compute dhi_tb = dhi.
* recode negaive dhi into zero
if (dhi_tb<0) dhi_tb=0.
EXECUTE. 
compute dhi_log = ln(dhi_tb). 
EXECUTE. 
if (missing(dhi_log) & NOT(missing(dhi_tb))) dhi_log=0. 
EXECUTE. 
* create person weight as hwgt times number of household members. 
compute wt = hpopwgt*nhhmem . 
weight by wt. 
!enddefine . 

define decilecalc (). 
preserve .  
set tvars names tnumbers values.  
dataset declare decileratio.  
WEIGHT BY hpopwgt. 
sort cases by did.  
split file by did.  
OMS      
 / select tables      
 / if command = ['Frequencies'] subtypes=['Statistics']      
 /destination format = sav        outfile = 'decileratio'      
 /columns sequence = [l1 r2] .  
frequencies variables = dhi_log 
  /percentiles = 25 50 75 
  /format = notable . 
OMSEND. 
weights off. 
restore. 
match files file = * 
  /table = 'decileratio' 
  /rename (var1 = did) 
  /by did . 
!enddefine .  
 
define topbottom (). 
weight by wt. 
COMPUTE iqr=dhi_log_75-dhi_log_25. 
EXECUTE. 
* detect upper bound for extreme values 
COMPUTE upper_bound=dhi_log_75 + (iqr * 3). 
EXECUTE. 
COMPUTE lower_bound=dhi_log_25 - (iqr * 3). 
EXECUTE. 
* top code income at upper bound for extreme values 
if dhi_tb>exp(upper_bound) dhi_tb=exp(upper_bound).  
EXECUTE. 
* bottom code income at lower bound for extreme values 
if dhi_tb<exp(lower_bound) dhi_tb=exp(lower_bound). 
EXECUTE. 
* create equivalised income, set equivalence scale as square root of household members 
compute edhi_tb = dhi_tb/(nhhmem**0.5).
compute pcdhi_tb = dhi_tb/nhhmem.
!enddefine .

get file = gt06h /keep=did dhi hifactor hpub_i hpub_u hpub_a hiprivate hxitsc hpopwgt nhhmem grossnet.

* run the dataprepare, decilecalc and topbottom
dataprepare.
decilecalc.
topbottom.

weight by hpopwgt.
descriptives variables = dhi dhi_tb.
frequencies variables = dhi dhi_tb /statistics=median /format=notable.
compute populat = hpopwgt * nhhmem.
weight by populat.
descriptives variables = pcdhi_tb edhi_tb.
frequencies variables = pcdhi_tb edhi_tb /statistics=median /format=notable.


TITLE Exercise 4: Inequality: The Gini Index.

define ginicalc () 
sort cases by inc_var (a).  
compute cumwgt = cumwgt + wt_var.  
leave cumwgt.  
aggregate outfile= * 
   mode = addvariables 
    /break= did 
    /meany= mean(inc_var) 
    /meanr= mean (cumwgt) 
    /n=n. 
compute devy= inc_var - meany.  
compute rank= cumwgt/n.  
compute devr = (rank - 0.5).  
compute prod= devy*devr.  
aggregate outfile= * 
    /break=did 
    /sumprod= sum(prod) 
    /meany= mean(inc_var) 
    /n=n. 
compute cov= sumprod/(n-1). 
compute gini=cov*2/meany. 
formats gini (f10.4). 
descriptives var=gini .  
!enddefine . 
 
define dataprepare ().  
SET ERRORS OFF. 
compute miss_comp = 0.
if (missing(dhi) or missing(hifactor) or missing(hpub_i) or missing(hpub_u) or missing(hpub_a) or missing(hiprivate) or missing(hxitsc)) miss_comp = 1.
select if miss_comp eq 0.
* select only records if dhi filled. 
select if not missing(dhi) . 
* create top and bottom coded household disposable income.
compute dhi_tb = dhi.
* recode negaive dhi into zero
if (dhi_tb<0) dhi_tb=0.
EXECUTE. 
compute dhi_log = ln(dhi_tb). 
EXECUTE. 
if (missing(dhi_log) & NOT(missing(dhi_tb))) dhi_log=0. 
EXECUTE. 
* create person weight as hwgt times number of household members. 
compute wt = hpopwgt*nhhmem . 
* create child weight as hwgt times number of household members under 18. 
weight by wt. 
!enddefine . 

define decilecalc (). 
preserve .  
set tvars names tnumbers values.  
dataset declare decileratio.  
WEIGHT BY hpopwgt. 
sort cases by did.  
split file by did.  
OMS      
 / select tables      
 / if command = ['Frequencies'] subtypes=['Statistics']      
 /destination format = sav        outfile = 'decileratio'      
 /columns sequence = [l1 r2] .  
frequencies variables = dhi_log 
  /percentiles = 25 50 75 
  /format = notable . 
OMSEND. 
weights off. 
restore. 
match files file = * 
  /table = 'decileratio' 
  /rename (var1 = did) 
  /by did . 
!enddefine .  
 
define topbottom (). 
weight by wt. 
COMPUTE iqr=dhi_log_75-dhi_log_25. 
EXECUTE. 
* detect upper bound for extreme values 
COMPUTE upper_bound=dhi_log_75 + (iqr * 3). 
EXECUTE. 
COMPUTE lower_bound=dhi_log_25 - (iqr * 3). 
EXECUTE. 
* top code income at upper bound for extreme values 
if dhi_tb>exp(upper_bound) dhi_tb=exp(upper_bound).  
EXECUTE. 
* bottom code income at lower bound for extreme values 
if dhi_tb<exp(lower_bound) dhi_tb=exp(lower_bound). 
EXECUTE. 
* create equivalised income, set equivalence scale as square root of household members 
compute edhi_tb = dhi_tb/(nhhmem**0.5).
compute pcdhi_tb = dhi_tb/nhhmem.
!enddefine .
 
get file = gt06h /keep=did dhi hifactor hpub_i hpub_u hpub_a hiprivate hxitsc hpopwgt nhhmem grossnet. 

* run the dataprepare, decilecalc and topbottom
dataprepare.
decilecalc.
topbottom.

* set two input parameters (weighting and income variable). 
compute wt_var =  hpopwgt. 
compute inc_var = dhi_tb. 

* weight the dataset with the weight variable complying with the inequality measure
weight by hpopwgt . 

* run the gini calculation block
ginicalc.  
 
get file = gt06h /keep=did dhi hifactor hpub_i hpub_u hpub_a hiprivate hxitsc hpopwgt nhhmem grossnet. 

* set two input parameters (weighting and income variable). 
dataprepare.
decilecalc.
topbottom.
  
compute wt_var = hpopwgt*nhhmem. 
compute inc_var = pcdhi_tb. 
weight by wt_var. 
ginicalc.  
  
get file = gt06h /keep=did dhi hifactor hpub_i hpub_u hpub_a hiprivate hxitsc hpopwgt nhhmem grossnet. 

* set two input parameters (weighting and income variable). 
dataprepare.
decilecalc.
topbottom.
  
compute wt_var = hpopwgt*nhhmem. 
compute inc_var = edhi_tb. 
weight by wt_var. 
ginicalc. 


TITLE Exercise 5: Relative poverty rates.

define dataprepare ().  
SET ERRORS OFF. 
compute miss_comp = 0.
if (missing(dhi) or missing(hifactor) or missing(hpub_i) or missing(hpub_u) or missing(hpub_a) or missing(hiprivate) or missing(hxitsc)) miss_comp = 1.
select if miss_comp eq 0.
* select only records if dhi filled. 
select if not missing(dhi) . 
* create top and bottom coded household disposable income.
compute dhi_tb = dhi.
* recode negaive dhi into zero
if (dhi_tb<0) dhi_tb=0.
EXECUTE. 
compute dhi_log = ln(dhi_tb). 
EXECUTE. 
if (missing(dhi_log) & NOT(missing(dhi_tb))) dhi_log=0. 
EXECUTE. 
* create person weight as hwgt times number of household members. 
compute wt = hpopwgt*nhhmem . 
weight by wt. 
!enddefine . 

define decilecalc (). 
preserve .  
set tvars names tnumbers values.  
dataset declare decileratio.  
WEIGHT BY hpopwgt. 
sort cases by did.  
split file by did.  
OMS      
 / select tables      
 / if command = ['Frequencies'] subtypes=['Statistics']      
 /destination format = sav        outfile = 'decileratio'      
 /columns sequence = [l1 r2] .  
frequencies variables = dhi_log 
  /percentiles = 25 50 75 
  /format = notable . 
OMSEND. 
weights off. 
restore. 
match files file = * 
  /table = 'decileratio' 
  /rename (var1 = did) 
  /by did . 
!enddefine .  
 
define topbottom (). 
weight by wt. 
COMPUTE iqr=dhi_log_75-dhi_log_25. 
EXECUTE. 
* detect upper bound for extreme values 
COMPUTE upper_bound=dhi_log_75 + (iqr * 3). 
EXECUTE. 
COMPUTE lower_bound=dhi_log_25 - (iqr * 3). 
EXECUTE. 
* top code income at upper bound for extreme values 
if dhi_tb>exp(upper_bound) dhi_tb=exp(upper_bound).  
EXECUTE. 
* bottom code income at lower bound for extreme values 
if dhi_tb<exp(lower_bound) dhi_tb=exp(lower_bound). 
EXECUTE. 
* create equivalised income, set equivalence scale as square root of household members 
compute edhi_tb = dhi_tb/(nhhmem**0.5).
compute pcdhi_tb = dhi_tb/nhhmem.
!enddefine .

get file = gt06h /keep=did dhi hifactor hpub_i hpub_u hpub_a hiprivate hxitsc hpopwgt nhhmem grossnet.

* run the dataprepare, decilecalc and topbottom
dataprepare.
decilecalc.
topbottom.

compute populat = hpopwgt * nhhmem.
weight by populat.
aggregate outfile = * 
   mode = addvariables 
   /break = did 
   /medianedhi_tb = median(edhi_tb) . 
compute povline = medianedhi_tb * 0.5 . 
descriptives variables = povline . 
compute poor = 0 . 
if edhi_tb lt povline poor = 1 . 
weight by hpopwgt.
frequencies variables = poor . 
weight by populat.
frequencies variables = poor .


TITLE Exercise 6: Comparing income concepts.
  
define dataprepare ().  
SET ERRORS OFF.      
compute miss_comp = 0.   
if (missing(dhi) or missing(hifactor) or missing(hi33) or missing(hpub_i) or missing(hpub_u) or missing(hpub_a) or missing(hiprivate) or missing(hxitsc)) miss_comp = 1.   
select if miss_comp eq 0.   
* create person weight as hwgt times number of household members.    
compute wt = hwgt*nhhmem .    
compute mi_tb = hifactor + hi33 + hiprivate.   
compute siti_tb = hifactor +hi33 +  hiprivate + hpub_i + hpub_u - hxitsc.   
compute sa_tb = hifactor + hi33 + hiprivate + hpub_a.   
!enddefine .    
   
define prepare ().     
SET ERRORS OFF.    
* select only records if dhi filled.    
select if not missing(inc_var) .    
* recode negaive dhi into zero   
if (inc_var <0) inc_var =0.   
EXECUTE.    
compute inc_var_log = ln(inc_var).    
EXECUTE.    
if (missing(inc_var_log) & NOT(missing(inc_var))) inc_var_log =0.    
EXECUTE.    
weight by wt.    
!enddefine .    
   
define decilecalc ().    
*** decile procedure.     
preserve .     
set tvars names tnumbers values.     
dataset declare decileratio.     
WEIGHT BY hwgt.    
sort cases by did.     
split file by did.     
OMS         
 / select tables         
 / if command = ['Frequencies'] subtypes=['Statistics']         
 /destination format = sav        outfile = 'decileratio'         
 /columns sequence = [l1 r2] .     
frequencies variables = inc_var_log   
  /percentiles = 25 50 75    
  /format = notable .    
OMSEND.    
weights off.    
restore.    
match files file = *    
  /table = 'decileratio'    
  /rename (var1 = did)    
  /by did .   
DATASET CLOSE decileratio.   
!enddefine .     
    
define topbottom ().    
weight by wt.    
COMPUTE iqr= inc_var_log_75- inc_var_log_25.    
EXECUTE.    
* detect upper bound for extreme values    
COMPUTE upper_bound= inc_var_log_75+ (iqr * 3).    
EXECUTE.    
COMPUTE lower_bound= inc_var_log_25- (iqr * 3).    
EXECUTE.    
* top code income at upper bound for extreme values    
if inc_var >exp(upper_bound) inc_var =exp(upper_bound).     
EXECUTE.    
* bottom code income at lower bound for extreme values    
if inc_var <exp(lower_bound) inc_var =exp(lower_bound).    
EXECUTE.    
* create equivalised income, set equivalence scale as square root of household members    
compute ey = inc_var /(nhhmem**0.5).     
!enddefine .     

define povcalc ().  
aggregate outfile = *   
   mode = addvariables   
   / break = did   
   / ey_median = median(ey)  .    
compute povline5 = ey_median * 0.5 .  
match files file=*/keep  
did povline5.  
Dataset copy poverty.  
!enddefine .   

define povcalccnt ().  
MATCH FILES /FILE=*   
  /FILE='poverty'   
  /RENAME (did = d0)   
  /DROP= d0.   
EXECUTE.  
compute poor50 = 0 .  
if ey lt povline5 poor50 = 100 .  
variable labels poor50 'overall poverty rate 50%'.  
weight by wt.
descriptives  poor50 /statistics=mean /format=notable. 
!enddefine .  
  
define ginicalc ()    
sort cases by ey (a).     
compute cumwgt = cumwgt + wt.     
leave cumwgt.     
aggregate outfile= *    
   mode = addvariables    
    /break= did    
    /meany= mean(ey)    
    /meanr= mean (cumwgt)    
    /n=n.    
compute devy= ey - meany.     
compute rank= cumwgt/n.     
compute devr = (rank - 0.5).     
compute prod= devy*devr.     
aggregate outfile= *    
    /break=did    
    /sumprod= sum(prod)    
    /meany= mean(ey)    
    /n=n.    
compute cov= sumprod/(n-1).    
compute gini=cov*2/meany.    
formats gini (f10.4).    
descriptives var=gini .  
!enddefine .  
  
get file = gt06h /keep=did dhi hifactor hi33 hpublic hpub_i hpub_u hpub_a hiprivate hxitsc hpopwgt nhhmem grossnet hwgt nhhmem nhhmem17 nhhmem65  .   
dataprepare.  
* set one input parameter (income variable).    
compute inc_var =dhi.   
prepare.   
decilecalc.   
topbottom.     
povcalc.  
compute poor50 = 0 .  
if ey lt povline5 poor50 = 100 .  
variable labels poor50 'overall poverty rate 50%'.  
weight by wt.
descriptives  poor50 /statistics=mean /format=notable.  
TITLE Gini using dhi.  
ginicalc.    
   
get file = gt06h /keep=did dhi hifactor hi33 hpublic hpub_i hpub_u hpub_a hiprivate hxitsc hpopwgt nhhmem grossnet hwgt nhhmem nhhmem17 nhhmem65 .   
dataprepare.   
* set one input parameter (income variable).   
compute inc_var = mi_tb.   
prepare.   
decilecalc.   
topbottom. 
TITLE Poverty using mi_tb.     
povcalccnt.
TITLE Gini using mi_tb.
ginicalc.  

get file = gt06h /keep=did dhi hifactor hi33 hpublic hpub_i hpub_u hpub_a hiprivate hxitsc hpopwgt nhhmem grossnet hwgt nhhmem nhhmem17 nhhmem65 . 
dataprepare. 
* set one input parameter (income variable).   
compute inc_var = siti_tb. 
prepare.   
decilecalc.   
topbottom.   
TITLE Gini using siti_tb.  
povcalccnt.
TITLE Gini using siti_tb.  
ginicalc.  

get file = gt06h /keep=did dhi hifactor hi33 hpublic hpub_i hpub_u hpub_a hiprivate hxitsc hpopwgt nhhmem grossnet hwgt nhhmem nhhmem17 nhhmem65 . 
dataprepare. 
* set one input parameter (income variable).   
compute inc_var = sa_tb. 
prepare.   
decilecalc.   
topbottom. 
TITLE Poverty using sa_tb. 
povcalccnt.    
TITLE Gini using sa_tb.
ginicalc.  


TITLE Exercise 7: Comparing multiple countries.

define gt06data ()   
get file = gt06h / keep = did dhi hi33 hpublic hifactor hpub_i hpub_u hpub_a hiprivate hxitsc hpopwgt nhhmem grossnet hwgt.   
!enddefine   
define us04data ()   
get file = us04h / keep = did dhi hi33 hpublic hifactor hpub_i hpub_u hpub_a hiprivate hxitsc hpopwgt nhhmem grossnet hwgt.   
!enddefine   
define dk04data ()   
get file = dk04h / keep = did dhi hi33 hpublic hifactor hpub_i hpub_u hpub_a hiprivate hxitsc hpopwgt nhhmem grossnet hwgt.   
!enddefine   
define hu05data ()   
get file = hu05h / keep = did dhi hi33 hpublic hifactor hpub_i hpub_u hpub_a hiprivate hxitsc hpopwgt nhhmem grossnet hwgt.   
!enddefine   
define il05data ()   
get file = il05h / keep = did dhi hi33 hpublic hifactor hpub_i hpub_u hpub_a hiprivate hxitsc hpopwgt nhhmem grossnet hwgt.   
!enddefine   
   
   
define dataprepare ().    
SET ERRORS OFF.        
compute miss_comp = 0.     
if (missing(dhi) or missing(hifactor) or missing(hi33) or missing(hpub_i) or missing(hpub_u) or missing(hpub_a) or missing(hiprivate) or missing(hxitsc)) miss_comp = 1.     
select if miss_comp eq 0.     
* create person weight as hwgt times number of household members.      
compute wt = hwgt*nhhmem .      
compute mi_tb = hifactor + hi33 + hiprivate.     
compute siti_tb = hifactor +hi33 +  hiprivate + hpub_i + hpub_u - hxitsc.     
compute sa_tb = hifactor + hi33 + hiprivate + hpub_a.     
!enddefine .      
  
     
define prepare ().       
SET ERRORS OFF.      
* select only records if dhi filled.      
select if not missing(inc_var) .      
* recode negaive dhi into zero     
if (inc_var <0) inc_var =0.     
EXECUTE.      
compute inc_var_log = ln(inc_var).      
EXECUTE.      
if (missing(inc_var_log) & NOT(missing(inc_var))) inc_var_log =0.      
EXECUTE.      
weight by wt.      
!enddefine .      
     
define decilecalc ().      
*** decile procedure.       
preserve .       
set tvars names tnumbers values.       
dataset declare decileratio.       
WEIGHT BY hwgt.      
sort cases by did.       
split file by did.       
OMS           
 / select tables           
 / if command = ['Frequencies'] subtypes=['Statistics']           
 /destination format = sav        outfile = 'decileratio'           
 /columns sequence = [l1 r2] .       
frequencies variables = inc_var_log     
  /percentiles = 25 50 75      
  /format = notable .      
OMSEND.      
weights off.      
restore.      
match files file = *      
  /table = 'decileratio'      
  /rename (var1 = did)      
  /by did .     
DATASET CLOSE decileratio.     
!enddefine .       
      
define topbottom ().      
weight by wt.      
COMPUTE iqr= inc_var_log_75- inc_var_log_25.      
EXECUTE.      
* detect upper bound for extreme values      
COMPUTE upper_bound= inc_var_log_75+ (iqr * 3).      
EXECUTE.      
COMPUTE lower_bound= inc_var_log_25- (iqr * 3).      
EXECUTE.      
* top code income at upper bound for extreme values      
if inc_var >exp(upper_bound) inc_var =exp(upper_bound).       
EXECUTE.      
* bottom code income at lower bound for extreme values      
if inc_var <exp(lower_bound) inc_var =exp(lower_bound).      
EXECUTE.      
* create equivalised income, set equivalence scale as square root of household members      
compute ey = inc_var /(nhhmem**0.5).       
!enddefine .       
  
define run ().  
prepare.  
decilecalc.  
topbottom.  
!enddefine.   
  
define povcalc ().    
aggregate outfile = *     
   mode = addvariables     
   / break = did     
   / ey_median = median(ey)  .      
compute povline5 = ey_median * 0.5 .    
match files file=*/keep    
did povline5.    
Dataset copy poverty.    
!enddefine .     
  
define povcalccnt ().    
MATCH FILES /FILE=*     
  /FILE='poverty'     
  /RENAME (did = d0)     
  /DROP= d0.     
EXECUTE.    
compute poor50 = 0 .    
if ey lt povline5 poor50 = 100 .    
variable labels poor50 'overall poverty rate 50%'.    
weight by wt.  
descriptives  poor50 /statistics=mean /format=notable.   
!enddefine .    
    
define ginicalc ()      
sort cases by ey (a).       
compute cumwgt = cumwgt + wt.       
leave cumwgt.       
aggregate outfile= *      
   mode = addvariables      
    /break= did      
    /meany= mean(ey)      
    /meanr= mean (cumwgt)      
    /n=n.      
compute devy= ey - meany.       
compute rank= cumwgt/n.       
compute devr = (rank - 0.5).       
compute prod= devy*devr.       
aggregate outfile= *      
    /break=did      
    /sumprod= sum(prod)      
    /meany= mean(ey)      
    /n=n.      
compute cov= sumprod/(n-1).      
compute gini=cov*2/meany.      
formats gini (f10.4).      
descriptives var=gini .    
!enddefine .    
    
define edhi ()  
dataprepare.   
compute inc_var = dhi.   
run.      
povcalc.    
compute poor50 = 0 .    
if ey lt povline5 poor50 = 100 .    
variable labels poor50 'overall poverty rate 50%'.    
weight by wt.  
descriptives  poor50 /statistics=mean /format=notable.    
TITLE Gini using dhi.    
ginicalc.      
!enddefine.  
    
    
define emi ()    
dataprepare.  
compute inc_var = mi_tb.     
run.   
TITLE Poverty using mi_tb.       
povcalccnt.  
TITLE Gini using mi_tb.  
ginicalc.   
!enddefine.    
   
  
define esiti ()  
dataprepare.  
compute inc_var = siti_tb.   
run.  
TITLE Gini using siti_tb.    
povcalccnt.  
TITLE Gini using siti_tb.    
ginicalc.    
!enddefine.    
   
  
define esa ()   
dataprepare.   
compute inc_var = sa_tb.  
run.  
TITLE Poverty using sa_tb.   
povcalccnt.      
TITLE Gini using sa_tb.  
ginicalc.   
!enddefine.    
   
define stat ()  
frequencies variables = grossnet.    
descriptives variables = hpublic hpub_i hpub_u hpub_a /statistics=mean /format=notable.  
!enddefine   
  
TITLE ==================================================.  
TITLE Guatemala.   
TITLE ==================================================.  
gt06data.  
edhi.    
gt06data.     
emi.   
gt06data.     
esiti.  
gt06data.     
esa.  
gt06data.    
stat.  
  
TITLE ==================================================.  
TITLE United States.  
TITLE ==================================================.   
us04data.  
edhi.    
us04data.     
emi.   
us04data.     
esiti.  
us04data.     
esa.  
us04data.    
stat.  
  
TITLE ==================================================.  
TITLE Denmark.  
TITLE ==================================================.  
dk04data.  
edhi.    
dk04data.     
emi.   
dk04data.     
esiti.  
dk04data.     
esa.  
dk04data.    
stat.  
  
TITLE ==================================================.  
TITLE Hungary.  
TITLE ==================================================.   
hu05data.  
edhi.    
hu05data.     
emi.   
hu05data.     
esiti.  
hu05data.     
esa.  
hu05data.    
stat.   
  
TITLE ==================================================.  
TITLE Israel.  
TITLE ==================================================.    
il05data.  
edhi.    
il05data.     
emi.   
il05data.     
esiti.  
il05data.     
esa.  
il05data.    
stat.